import requests
import json


headers = {
    "authority": "m.flight.qunar.com",
    "accept": "application/json; charset=UTF-8",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "content-type": "application/json; charset=UTF-8",
    "csht": "",
    "origin": "https://m.flight.qunar.com",
    "pre": "8ef659f1-d79d42-8948fe61-56971c97-c2b07a56d392",
    "referer": "https://m.flight.qunar.com/ncs/page/flightdetail?startCity=%E6%AD%A6%E6%B1%89&destCity=%E5%B9%BF%E5%B7%9E&startDate=2024-01-26&backDate=&code=CZ5627&touchToken=1AFC6D69E5F9C3C1A072B3E43CD395E7&from=f_athena_urban&cat=mobile.wap.ptflag.seckill&bd_source=wx_wx_app",
    "sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Microsoft Edge\";v=\"120\"",
    "sec-ch-ua-mobile": "?1",
    "sec-ch-ua-platform": "\"Android\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36 Edg/120.0.0.0",
    "wps": "21"
}
cookies = {
    "QN1": "00008a802f105894fd08bf9f",
    "QN48": "00008a802f105894fd08bf9f",
    "ctt_june": "1683616182042##iK3wWKjwauPwawPwasDwWRohWPfIa%3DGIWKa%3DasGTX2jNXKgsVPGTWPWTWSPwiK3siK3saKg8aRPsWRjNWK38awPwaUvt",
    "QN601": "4bf7ee05aad7958336e2d1f791e27bda",
    "Alina": "9fb4798c-ce7071-81430050-48adef58-6975655c19c8",
    "quinn": "a467d0c651abfe13b7310b85674ad9552fb906d9fdffe3902256180025c16f4c1c0f5587743a673ff583881c045e8a88",
    "QN271AC": "register_pc",
    "QN99": "7645",
    "QunarGlobal": "10.66.42.199_-2c9240c1_18c47ea7dad_5ce3|1702024831685",
    "fid": "6c6908d2-9f6c-4ec5-9757-6aaf52f6c53c",
    "nfes_isSupportWebP": "1",
    "_RSG": "ZnanMhNw6ZFItIt79pyJo8",
    "_RDG": "2897865caf220326461cef13855e3ae3f5",
    "_RGUID": "f8c6e97a-d6c6-4c63-8c93-f33247dd2dd2",
    "QN57": "17020259848020.059137727025676545",
    "QN58": "1702025984801%7C1702026106262%7C4",
    "_RF1": "1.199.129.230",
    "_bfa": "1.1702025000517.1awxoad.1.1702025000517.1702544281849.2.8.10650073447",
    "_ubtstatus": "%7B%22vid%22%3A%221702025000517.1awxoad%22%2C%22sid%22%3A2%2C%22pvid%22%3A8%2C%22pid%22%3A10650073447%7D",
    "QN43": "4",
    "QN271SL": "d4efef601b1ead71e1f5f1cebd550af0",
    "QN271RC": "d4efef601b1ead71e1f5f1cebd550af0",
    "_q": "U.sfkrczd9363",
    "csrfToken": "CtpNtHacJsgsMmIIYcHhXBgivuycqioa",
    "_s": "s_V2LXZPM7AN2PHULT5UK5EKPPG4",
    "_t": "28486264",
    "_v": "zTveHGB07lpAXene4sqkeGo5IziYXk2-DqmVpp2gFCHka2t90aDEBjrkAVn08js8tkaCrsM2mdKGNOjOXu4z2UMMuxdZDRw11vKscAgd4KOBVcNdEl1HRPYh91UnFq6uTVFG5IKOA7U40BOuZtzNpvs_6wZjHHHRp0-c_Bc6vRBj",
    "QN42": "%E5%8E%BB%E5%93%AA%E5%84%BF%E7%94%A8%E6%88%B7",
    "_uf": "sfkrczd9363",
    "_i": "DFiEZ6MMektwALKLtmOovmhW9rew",
    "QN269": "CDB95F50A53D11EEB5B942636E545133",
    "QN238": "zh_cn",
    "_mdp": "2EF0A82CC83A63142A85412E5398BF60",
    "qunar-assist": "{%22version%22:%2220211215173359.925%22%2C%22show%22:false%2C%22audio%22:false%2C%22speed%22:%22middle%22%2C%22zomm%22:1%2C%22cursor%22:false%2C%22pointer%22:false%2C%22bigtext%22:false%2C%22overead%22:false%2C%22readscreen%22:false%2C%22theme%22:%22default%22}",
    "QN44": "sfkrczd9363",
    "QN163": "0",
    "QN243": "1",
    "ariaDefaultTheme": "null",
    "QN205": "s%3Dbaidu",
    "QN277": "s%3Dbaidu",
    "QN267": "14576503779672d10c",
    "_vi": "15Uvp6hqZUzx_EWB0jlBBYZALXyPwwfFgrMP4mY3HA8tQERZbymCiIb2Ec_ffnVpXbW0iWXjvJ03jSxEXdeRFj5m4JLMw77_YG5Vht6dd8rDwLSEjqUsadq6MT1IMBAnJnqK2RS4Z7roMZv-oo3MV9jwcevk9bvj0zV_ozowBkM3",
    "QN66": "wx_wx_app",
    "QN300": "wx_wx_app",
    "QN621": "fr%3Df_athena_urban%261490067914133%2Ctestssong%3DDEFAULT",
    "F235": "1705797595320",
    "QN235": "2024-01-21",
    "_tt": "tc_70ac268abaac7c9a_18d299d2eb3_baf5",
    "QN271": "e2040235-5535-4457-8607-eee35f610fc1",
    "cs_june": "2a21735a9da6acbacf0138306bfb374c2eb27bc995503abd3ceb2e1c15eda3e398820f7ba5ba8b89e44ae23b5308c5533575e01eecaa840268f5305f37c48a5eb17c80df7eee7c02a9c1a6a5b97c117926b78930dd6d8c78d5e572835cc8b45b5a737ae180251ef5be23400b098dd8ca",
    "QN668": "51%2C57%2C50%2C55%2C58%2C50%2C51%2C59%2C57%2C55%2C58%2C58%2C59",
    "ctf_june": "1683616182042##iK3wVRXnaUPwawPwa%3DDAaSGhWK2nXstAaRjnW2anVKa8aDiGasgOaKiGEPPsiK3siK3saKg8WKt8aK2%2BWStNauPwaUvt"
}
url = "https://m.flight.qunar.com/flight/api/touchUnirInnerOta"
params = {
    "_t": "1705801977041",
    "filterSingleChild": "undefined"
}
data = {
    "dep": "武汉",
    "arr": "广州",
    "goDate": "2024-01-26",
    "flightKey": "CZ5627",
    "feedLog": "NaN,NaN",
    "screenHeight": 455,
    "screenWidth": 400,
    "asyncTime": 0,
    "queryId": "",
    "scene": 0,
    "cat": "mobile.wap.ptflag.seckill",
    "realFlightKey": "",
    "roundwayStyle": 0,
    "transCity": "",
    "otaFlightInfo": {},
    "preQtrace": "",
    "otaTopYellowTip": "",
    "localFromSource": 1,
    "extparams": "{\"flightNoAndAirports\":{\"EU2735\":\"CTU_XMN_2020-12-18\"}}",
    "showSelectPassengerModule": False,
    "changeCity": False,
    "c": "{\"cid\":\"wx_wx_app\",\"pid\":\"\",\"gid\":\"00008a802f105894fd08bf9f\",\"uid\":\"00008a802f105894fd08bf9f\",\"vid\":\"91001392\",\"osVersion\":\"\",\"model\":\"\",\"mac\":\"02:00:00:00:00:00\",\"t\":\"f_flight_rn_domestic_otalist\",\"un\":\"sfkrczd9363\",\"usid\":\"\",\"ip\":\"\",\"port\":\"\",\"mno\":\"\",\"nt\":\"\",\"lat\":\"\",\"lgt\":\"\",\"atomId\":190,\"qpVersion\":99999,\"catom\":\"com.mqunar.atom.flight_190\",\"cas\":\"com.mqunar.atom.flight_190\",\"cqp\":\"f_major_bundle_rn#1757\"}",
    "Bella": "1683616182042##029ca170faf97ba6196b7c3902fe2a9ab778901e##iKohiK3wgMkMf-i0gUPwaUPsXuPwaM=bfMnQfOH=q5GAcMGwqMWxcuPwE5a0aS30a2a0aSi8y9WScOnxiK3wiKWTiK3wVRjsahPwawPwasThaPjAaSgnVDERVD3maKa0aSa0aSanWsvAVRvnVKg+aRaAiK3wiKiRiK3wgOHQgMn0duPwaUPsXuPwaSHMWMX+f9DmWsTUaKESjOiUWs0SaRgwWREHjSDAaOawiK3wiKiRiK3woI0=cIP0aS30a=D0aS30EKP0VDP0X230EKP0VKa0XPD0EKP0VRX0X2j0EKg0X2X0VKD0EKj0VPa0X2D0EKg0XKP0XKt0EKj0VPa0VDX0EKP0VDD0XKD0aS30a2a0aSilf-0+c+i2gwPwaUPsXuPwaUPwXwkGWuPmEukhXUkGVuPmaUkTawkGWuPmWhkhEUPwXwkGVhPmVhkTXukGWwPmEUkTEhkGWUPNEUkTWukGVhkTEUkTaUPwXwPwaUPwXwPwaME0gOWwy-T=y9FbiK3wiKWTiK3wiPPAiKHGiPihiPPAiK2siPGTiPPAiKt=iPiIJGGAcMGwqMWxcu20EK20XKa0VPP0EKj0VPa0X2D0EKg0XKP0XKt0a2a0EKg0VR20XS20EKX0X230XSg0aS30a2a0aSipc+W=iK3wiKWTiK3wcuNMcI05yCXbg-kbj-3bjOFeiK3wiKiRiK3wgOWwy-T=P+iSiK3wiKWTiKkhiK3wguNno9NHg5QrqMWxcuPwE5GAiK3wiKiRiK3wguNno9NHg5QrqMWxcuPwEMfLiK3wiKkDiKoD##58QIjMmOdB6tWkQjm9Iab##dep,arr,goDate,flightKey,feedLog,screenHeight,screenWidth,asyncTime,queryId,scene,cat,realFlightKey,roundwayStyle,transCity,otaFlightInfo,preQtrace,otaTopYellowTip,localFromSource,extparams,passengers,showSelectPassengerModule,changeCity,c",
    "b": "{\"dep\":\"武汉\",\"arr\":\"广州\",\"goDate\":\"2024-01-29\",\"flightKey\":\"CZ5627\",\"feedLog\":\"NaN,NaN\",\"screenHeight\":455,\"screenWidth\":400,\"asyncTime\":0,\"queryId\":\"\",\"scene\":0,\"cat\":\"mobile.wap.ptflag.seckill\",\"realFlightKey\":\"\",\"roundwayStyle\":0,\"transCity\":\"\",\"otaFlightInfo\":{},\"preQtrace\":\"\",\"otaTopYellowTip\":\"\",\"localFromSource\":1,\"extparams\":\"{\\\"flightNoAndAirports\\\":{\\\"EU2735\\\":\\\"CTU_XMN_2020-12-18\\\"}}\",\"showSelectPassengerModule\":false,\"changeCity\":false,\"c\":{\"vid\":\"91001392\",\"gid\":\"00008a802f105894fd08bf9f\",\"catom\":\"com.mqunar.atom.flight_190\",\"atomId\":190,\"cas\":\"com.mqunar.atom.flight_190\",\"cqp\":\"f_major_bundle_rn#1757\",\"t\":\"f_flight_rn_domestic_otalist\"},\"Bella\":\"1683616182042##029ca170faf97ba6196b7c3902fe2a9ab778901e##iKohiK3wgMkMf-i0gUPwaUPsXuPwaM=bfMnQfOH=q5GAcMGwqMWxcuPwE5a0aS30a2a0aSi8y9WScOnxiK3wiKWTiK3wVRjsahPwawPwasThaPjAaSgnVDERVD3maKa0aSa0aSanWsvAVRvnVKg+aRaAiK3wiKiRiK3wgOHQgMn0duPwaUPsXuPwaSHMWMX+f9DmWsTUaKESjOiUWs0SaRgwWREHjSDAaOawiK3wiKiRiK3woI0=cIP0aS30a=D0aS30EKP0VDP0X230EKP0VKa0XPD0EKP0VRX0X2j0EKg0X2X0VKD0EKj0VPa0X2D0EKg0XKP0XKt0EKj0VPa0VDX0EKP0VDD0XKD0aS30a2a0aSilf-0+c+i2gwPwaUPsXuPwaUPwXwkGWuPmEukhXUkGVuPmaUkTawkGWuPmWhkhEUPwXwkGVhPmVhkTXukGWwPmEUkTEhkGWUPNEUkTWukGVhkTEUkTaUPwXwPwaUPwXwPwaME0gOWwy-T=y9FbiK3wiKWTiK3wiPPAiKHGiPihiPPAiK2siPGTiPPAiKt=iPiIJGGAcMGwqMWxcu20EK20XKa0VPP0EKj0VPa0X2D0EKg0XKP0XKt0a2a0EKg0VR20XS20EKX0X230XSg0aS30a2a0aSipc+W=iK3wiKWTiK3wcuNMcI05yCXbg-kbj-3bjOFeiK3wiKiRiK3wgOWwy-T=P+iSiK3wiKWTiKkhiK3wguNno9NHg5QrqMWxcuPwE5GAiK3wiKiRiK3wguNno9NHg5QrqMWxcuPwEMfLiK3wiKkDiKoD##58QIjMmOdB6tWkQjm9Iab##dep,arr,goDate,flightKey,feedLog,screenHeight,screenWidth,asyncTime,queryId,scene,cat,realFlightKey,roundwayStyle,transCity,otaFlightInfo,preQtrace,otaTopYellowTip,localFromSource,extparams,passengers,showSelectPassengerModule,changeCity,c\"}"
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, cookies=cookies, params=params, data=data)

# res_json = json.loads(response.text)
# res_data = res_json.get('data')
# print(res_data.values())
# print(res_data.keys())
print(response.text)
print(response)